Cost Calculation
constructor(secAccount: Account, asOfDate: Int? = null, preparedTxns: TxnSet? = null, obtainCurrentBalanceToo: Boolean = false, unRealizedSaleTxn: SplitTxn? = null, useTaxDate: Boolean = false)
Parameters
prepared Txns
Default: null. Optional. A candidate set of txns for this security account, which saves this calculation scanning the whole book. It is not the authoritative universe: the txns supplied are still filtered to secAccount and to the as-of date, and are copied into this calculation's own set, so the supplied TxnSet is never mutated.
obtain Current Balance Too
Default: false. When true and this calculation's as-of date is after today, a second calculation dated today is performed - result stored in the currentBalanceCostCalculation property. When the as-of date is today or earlier, currentBalanceCostCalculation is this calculation itself - so with a past as-of date it is NOT a today calculation. Cannot be combined with unRealizedSaleTxn.